package mwt.xml.waxdbforms.business;

public abstract class WAXDBFormsServiceFactory {
    private static WAXDBFormsServiceFactory instance = null;

    protected WAXDBFormsServiceFactory() {}

    public synchronized static void setInstance(WAXDBFormsServiceFactory factory) {
        if (instance != null) {
            throw new RuntimeException("Instance of WAXDBFormsServiceFactory already exist!");
	}
	instance = factory;

    }

    public synchronized static WAXDBFormsServiceFactory getInstance() {
        if (instance == null) {
            throw new RuntimeException("No instance of WAXDBFormsServiceFactory has been setted!");
	}

        return instance;
    }

    public abstract SecurityService getSecurityService();
    public abstract DbmsService getDbmsService();
}
